<?php
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $model \app\models\Post */

?>

<?php foreach ($models as $model): ?>
<div class="card-box">
    <div class="card-box-inner">
        <div class="card-img">
            <a href="" data-href="<?= Url::to(['detail', 'id' => $model->id]); ?>">
                <img src="<?= $model->thumbnail; ?>"/>
            </a>
        </div>
        <div class="card-content">
            <div class="card-content-title">
                <h4><?= Html::encode($model->title); ?></h4>
            </div>
            <div class="card-tag-row">
                <i class="iconfont">&#xe614;</i><label><?= Html::encode($model->tag); ?></label>
            </div>
            <div class="card-content-ft">
                <div class="fflex">
                    <div>
                        <span><?= date('Y-m-d', $model->ctime); ?></span>
                    </div>
                    <div>
                        <a href="javascript:;">
                            <i class="iconfont">&#xe638;</i>
                            <?= $model->comments; ?>
                        </a>
                        <a href="javascript:;" class="btn-love ">
                            <i class="iconfont icon-love1"></i>
                            <?= $model->likes; ?>
                        </a>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php endforeach; ?>
